package hikari.gui.panels.particle;

import hikari.gui.guicomponents.ExpandablePanel;
import org.swig.jirr.IParticleEmitter;
import org.swig.jirr.IVideoDriver;
import org.swig.jirr.MATERIAL_FLAG;
import org.swig.jirr.SColor;
import org.swig.jirr.SMaterial;

/**
 * @author sad
 */
public abstract class EmitterEditorPanel extends ExpandablePanel {
    private static SMaterial boxMaterial;

    protected SMaterial getMaterial() {
        if (boxMaterial == null) {
            boxMaterial = new SMaterial();
            boxMaterial.setFlag(MATERIAL_FLAG.EMF_LIGHTING, false);
            boxMaterial.setDiffuseColor(SColor.WHITE);
        }
        return boxMaterial;
    }

    public abstract void putFromEmmiter(IParticleEmitter particleEmitter);

    public abstract void putToEmmiter(IParticleEmitter emmiter);

    public abstract void renderEmitter(IVideoDriver driver);
}
